<?php
/**
 * Created by phpstorm.
 * User: Chain
 * Date: 2020/11/19
 * Time: 18:15
 */

namespace App\Http\Request\System\Message;


use App\Common\Utils\BaseRequest;

class AddRequest extends BaseRequest
{

    public function rules() {
        $rules = [
            'title' => 'required|string',
            'content' => 'required|string',
            'user_id' => 'required|integer',
        ];

        return $rules;
    }

    public function messages() {
        $messages = [
            'title.required' => 'user_id不能为空',
            'content.required' => 'user_id不能为空',
            'user_id.integer' => 'user_id为整数',
        ];

        return $messages;
    }
}
